<?php /*a:2:{s:41:"D:\www\long_shop\app\view\dept\index.html";i:1726892714;s:42:"D:\www\long_shop\app\view\common\head.html";i:1702389678;}*/ ?>
<!DOCTYPE html>
<html>
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <script src="/static/jquery/jquery-1.12.4.min.js"></script>    
    <link href="/static/bst5.3.2/css/bootstrap.min.css" rel="stylesheet">
    <script src="/static/bst5.3.2/js/bootstrap.bundle.min.js"></script>
    <link rel="stylesheet" href="/static/bst-icons/font/bootstrap-icons.css">
    <script src="/static/layer/layer/layer.js"></script>
    <link rel="stylesheet" href="/static/css/my.css">    
</head>
<head>
    <title>组织架构管理</title>
    <style>
        a{text-decoration:none;}
    </style>
</head>
<body >
<div class="container-fluid">
    <h2>组织架构管理</h2>
    <table class="table table-sm table-hover table-striped">
        <thead>
            <th>序号</th>
            <th>部门名称</th>
            <th>部门类型</th>
            <th>负责人</th>
            <th>地址</th>
            <th>联系电话</th>
            <th>登记日期</th>
            <th>登记人</th>
            <th>状态</th>
            <th>
                <button type="button" class="btn btn-sm btn-primary">
                    <a href="/index.php/dept/dept_add" alt="新增部门(New department)"><span class="bi-plus-lg" style="color:white;"></span></a>
                </button>
            </th>
        </thead>
        <tbody>
            <?php foreach($data as $k=>$kv): ?>
            <tr>
                <td><?php echo htmlentities($k+1); ?></td>
                <td <?php if($kv['status']==2): ?> style="color:red;text-decoration: line-through;"<?php endif; ?>>
                    <?php if($kv['imgs']==1): ?>
                        <c style="margin-left:20px;"></c>|__
                    <?php elseif($kv['imgs']==2): ?>
                        <c style="margin-left:50px;"></c>|__
                    <?php elseif($kv['imgs']==3): ?>
                        <c style="margin-left:80px;"></c>|__
                    <?php endif; ?>

                    
                    <?php echo htmlentities($kv['name']); ?>
                </td>
                <td><?php if($kv['type']==1): ?>平台部门<?php else: ?><span class="bi-house-fill"></span>商家<?php endif; ?></td>
                <td><?php echo htmlentities($kv['user_id_name']); ?></td>
                <td><?php echo htmlentities($kv['address']); ?></td>
                <td><?php echo htmlentities($kv['tel']); ?></td>
                <td><?php echo htmlentities($kv['create_time']); ?></td>
                <td><?php echo htmlentities($kv['creater_name']); ?></td>
                <td><?php echo htmlentities($kv['status_name']); ?></td>
                <td>
                    <a href="/index.php/dept/edit/id/<?php echo htmlentities($kv['id']); ?>">
                        <button style="button" class="btn btn-sm btn-info"><span class="bi-pencil"></span></button>
                    </a>
                </td>
            </tr>
            <?php endforeach; ?>

        </tbody>    
    </table>
</div>

</body>

<script type="text/javascript">
  function resetPwd(uid){
    if(!uid) return false;
      layer.confirm('是否确定重置帐号密码?', {
        btn: ['YES','CANCEL']
      }, function(){
        window.location.href="/index.php/user/resetPwd/id/"+uid;
      }, function(){
        layer.msg("Cancel!");
        return 0;
      });    
  }

</script>


</body>
</html>
